<%--
  Created by IntelliJ IDEA.
  User: lkx
  Date: 2020/12/15
  Time: 16:59
  To change this template use File | Settings | File Templates.
  //get从指定资源请求数据，post向指定资源提交要被处理的数据
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ include file="admin_menu.jsp"%>
<html>

    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;
            </span><span class="crumb-name">农产品管理</span>
            </div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="/Houtai/manager/admin_DoUserSelect" method="get">
                    <table class="search-tab">
                        <tr>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keyword" value="${param.keyword}" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="admin_useradd.jsp"><i class="icon-font"></i>新增产品</a>

                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>

                            <th>ID</th>
                            <th>农产品名</th>
                            <th>产地</th>
                            <th>加入时间</th>

                            <th>操作</th>

                        </tr>


                        <c:forEach var="u" items="${userlist}">
                            <tr>
                                <td class="tc"><input name="id[]" value="${u.USER_ID}" type="checkbox"></td>
                                <td>${u.USER_ID}</td>
                                <td>${u.USER_NAME}</td>
                                <td>${u.USER_ADDRESS}</td>
                                <td><fmt:formatDate value="${u.USER_BIRTHDAY}" pattern="yyyy-MM-dd"/></td>


<%--                                <td>${u.USER_BIRTHDAY}</td>--%>

                                <td>
                                    <a class="link-update" href="/Houtai/manager/admin_touserupdate?id=${u.USER_ID}&cpage=${cpage}">修改</a>


                                    <c:if test="${u.USER_STATUS==1}">
                                        <a class="link-del" href="javascript:Delete('你确定要删除${u.USER_NAME}吗?','/Houtai/manager/DoUserDel?id=${u.USER_ID}&cpage=${cpage}')">删除</a>
                                    </c:if>


                                </td>
                            </tr>
                        </c:forEach>
                        <script>
                            function Delete(mess,url) {
                                if (confirm(mess)){

                                    location.href=url;
                                }

                            }
                        </script>
                    </table>

                    <div class="list-page">
                        共${tsum}条记录，当前${cpage}/${tpage}页
                        <a href="/Houtai/manager/admin_DoUserSelect?cp=1${searchParams}">首页</a>
                        <a href="/Houtai/manager/admin_DoUserSelect?cp=${cpage-1<1?1:cpage-1}${searchParams}">上一页</a>
                        <a href="/Houtai/manager/admin_DoUserSelect?cp=${cpage+1>tpage?tpage:cpage+1}${searchParams}">下一页</a>
                        <a href="/Houtai/manager/admin_DoUserSelect?cp=${tpage}${searchParams}">尾页</a>
                    </div>

                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>
